package com.dj.product.k2faas.jpa.config;

import com.dj.product.k2faas.jpa.sqlgenerator.PostgresSqlGenerator;
import com.dj.product.k2faas.jpa.view.CommonView;
import com.dj.product.k2faas.jpa.view.JdbcCommonView;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.jdbc.core.namedparam.NamedParameterJdbcTemplate;

/**
 * Created by 丁建 on 2025/9/23 09:51
 *
 * @author 丁建
 */
@Configuration
public class ViewConfig {

    @Bean
    public CommonView commonView(NamedParameterJdbcTemplate namedParameterJdbcTemplate) {
        return new JdbcCommonView(namedParameterJdbcTemplate, new PostgresSqlGenerator());
    }

    public NamedParameterJdbcTemplate namedParameterJdbcTemplate;

}
